package com.ruoyi.attendance.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.attendance.domain.SignRecord;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

/**
 * 签到Mapper接口
 * 
 * @author Weiney
 * @date 2025-03-04
 */
public interface SignRecordMapper 
{
    /**
     * 查询签到
     * 
     * @param signId 签到主键
     * @return 签到
     */
    public SignRecord selectSignRecordBySignId(Long signId);

    /**
     * 查询签到列表
     * 
     * @param signRecord 签到
     * @return 签到集合
     */
    public List<SignRecord> selectSignRecordList(SignRecord signRecord);

    /**
     * 新增签到
     * 
     * @param signRecord 签到
     * @return 结果
     */
    public int insertSignRecord(SignRecord signRecord);

    /**
     * 修改签到
     * 
     * @param signRecord 签到
     * @return 结果
     */
    public int updateSignRecord(SignRecord signRecord);

    /**
     * 删除签到
     * 
     * @param signId 签到主键
     * @return 结果
     */
    public int deleteSignRecordBySignId(Long signId);

    /**
     * 批量删除签到
     * 
     * @param signIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSignRecordBySignIds(Long[] signIds);

    // 批量插入方法
    void insertSignRecords(List<SignRecord> signRecords);

    @Delete("delete from sign_record where course_record_id = #{courseRecordId}")
    int deleteSignRecordsByCourseRecordId(Long courseRecordId);
}
